feat: add timestamp-based branch naming option for specify init#1911
feat: add timestamp-based branch naming option for specify init#1911mnriem merged 5 commits intogithub:mainfrom
specify init#1911Conversation
There was a problem hiding this comment.
Pull request overview
Adds an opt-in timestamp-based feature branch prefix mode to Spec Kit initialization, persisting the choice in .specify/init-options.json and documenting how agents should invoke feature-creation scripts accordingly.
Changes:
- Add
--branch-numbering {sequential|timestamp}tospecify init, validate it, and persist it to init options. - Add
--timestamp/-Timestampsupport tocreate-new-featurescripts and relax feature-branch validation to accept timestamp prefixes. - Update docs/templates and add initial test coverage for the new behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Adds --branch-numbering option, validates it, and saves branch_numbering into init options. |
scripts/bash/create-new-feature.sh |
Adds --timestamp mode and handles conflicts with --number. |
scripts/bash/common.sh |
Allows timestamp-prefixed branches in feature-branch validation and prefix resolution. |
scripts/powershell/create-new-feature.ps1 |
Adds -Timestamp mode and adjusts truncation math for variable prefix length. |
scripts/powershell/common.ps1 |
Allows timestamp-prefixed branches and prefers timestamp spec dirs when inferring branch in no-git scenarios. |
templates/commands/specify.md |
Instructs agents to read branch_numbering and pass --timestamp/-Timestamp when configured. |
README.md |
Documents the new --branch-numbering option and adds an example. |
tests/test_branch_numbering.py |
Adds basic tests around persisting branch_numbering and enumerating valid values. |
tests/test_timestamp_branches.sh |
Adds a shell-based test suite for timestamp behavior in bash scripts/common helpers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Can you avoid doing large whitespace changes it makes it hard to see what changed
There was a merge conflict on the README I did wrong; were there more large whitespace issues you saw? |
mnriem
left a comment
There was a problem hiding this comment.
Please address Copiot feedback. If not applicable, please explain why
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bf2b23e to
77cf88b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.
Comments suppressed due to low confidence (1)
templates/commands/specify.md:89
- The IMPORTANT bullet says the script "determines the correct next number automatically", which isn't accurate in timestamp mode (there is no number;
--numberis ignored and a timestamp is generated). Reword this bullet to cover both modes (e.g., don't pass--number; in sequential it's auto-detected, in timestamp it's ignored).
**IMPORTANT**:
- Do NOT pass `--number` — the script determines the correct next number automatically
- Always include the JSON flag (`--json` for Bash, `-Json` for PowerShell) so the output can be parsed reliably
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@mnriem copilot feedback addressed and whitespace issue from merge resolved. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Upstream changes merged: - feat: add Junie agent support (github#1831) - feat: add timestamp-based branch naming option (--branch-numbering) (github#1911) - fix: Align native skills frontmatter with install_ai_skills (github#1920) - docs: add Extension Comparison Guide for community extensions (github#1897) - docs: update SUPPORT.md, fix issue templates, add preset submission template (github#1910) Tikalk customizations preserved: - Orange theme (ACCENT_COLOR = #f47721) - --team-ai-directives CLI parameter - Skills package manager (specify skill subcommand) - Bundled extensions/presets installation - Pre-Installed Extensions panel Version: 0.1.16
…v0.1.16) Upstream changes (6 commits): - feat: add Junie agent support (github#1831) - feat: add timestamp-based branch naming option (--branch-numbering timestamp) (github#1911) - fix: Align native skills frontmatter with install_ai_skills (github#1920) - docs: add Extension Comparison Guide for community extensions (github#1897) - docs: update SUPPORT.md, fix issue templates, add preset submission template (github#1910) - docs: update publishing guide with Category and Effect columns (github#1913) Tikalk customizations preserved: - Orange branding theme (#f47721) - --team-ai-directives CLI parameter - Skills package manager (specify skill subcommand) - Bundled extensions/presets installation - --contracts/--data-models script options
Description
Add --branch-numbering flag to
specify initsupporting 'sequential' (default, 001/002/003) or 'timestamp' (YYYYMMDD-HHMMSS) prefix modes. Timestamp mode is useful for distributed teams to avoid numbering conflicts. Config is persisted in init-options.json and the AI agent template reads it to pass --timestamp to the create-new-feature script.Relates to #1382
Testing
uv run specify --helpuv sync && uv run pytestAI Disclosure
Claude generated much of the code based on an existing patch we use that forces timestamps where this is an option.